3.2374 \(\int \frac{f+g x}{\left (a+b x+c x^2\right )^3} \, dx\)

Optimal. Leaf size=131 \[ \frac{3 (b+2 c x) (2 c f-b g)}{2 \left (b^2-4 a c\right )^2 \left (a+b x+c x^2\right )}-\frac{-2 a g+x (2 c f-b g)+b f}{2 \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )^2}-\frac{6 c (2 c f-b g) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{\left (b^2-4 a c\right )^{5/2}} \]

[Out]

-(b*f - 2*a*g + (2*c*f - b*g)*x)/(2*(b^2 - 4*a*c)*(a + b*x + c*x^2)^2) + (3*(2*c
*f - b*g)*(b + 2*c*x))/(2*(b^2 - 4*a*c)^2*(a + b*x + c*x^2)) - (6*c*(2*c*f - b*g
)*ArcTanh[(b + 2*c*x)/Sqrt[b^2 - 4*a*c]])/(b^2 - 4*a*c)^(5/2)

_______________________________________________________________________________________

Rubi [A]  time = 0.117137, antiderivative size = 131, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222 \[ \frac{3 (b+2 c x) (2 c f-b g)}{2 \left (b^2-4 a c\right )^2 \left (a+b x+c x^2\right )}-\frac{-2 a g+x (2 c f-b g)+b f}{2 \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )^2}-\frac{6 c (2 c f-b g) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{\left (b^2-4 a c\right )^{5/2}} \]

Antiderivative was successfully verified.

[In]  Int[(f + g*x)/(a + b*x + c*x^2)^3,x]

[Out]

-(b*f - 2*a*g + (2*c*f - b*g)*x)/(2*(b^2 - 4*a*c)*(a + b*x + c*x^2)^2) + (3*(2*c
*f - b*g)*(b + 2*c*x))/(2*(b^2 - 4*a*c)^2*(a + b*x + c*x^2)) - (6*c*(2*c*f - b*g
)*ArcTanh[(b + 2*c*x)/Sqrt[b^2 - 4*a*c]])/(b^2 - 4*a*c)^(5/2)

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 19.215, size = 121, normalized size = 0.92 \[ \frac{6 c \left (b g - 2 c f\right ) \operatorname{atanh}{\left (\frac{b + 2 c x}{\sqrt{- 4 a c + b^{2}}} \right )}}{\left (- 4 a c + b^{2}\right )^{\frac{5}{2}}} - \frac{3 \left (b + 2 c x\right ) \left (\frac{b g}{2} - c f\right )}{\left (- 4 a c + b^{2}\right )^{2} \left (a + b x + c x^{2}\right )} + \frac{2 a g - b f + x \left (b g - 2 c f\right )}{2 \left (- 4 a c + b^{2}\right ) \left (a + b x + c x^{2}\right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((g*x+f)/(c*x**2+b*x+a)**3,x)

[Out]

6*c*(b*g - 2*c*f)*atanh((b + 2*c*x)/sqrt(-4*a*c + b**2))/(-4*a*c + b**2)**(5/2)
- 3*(b + 2*c*x)*(b*g/2 - c*f)/((-4*a*c + b**2)**2*(a + b*x + c*x**2)) + (2*a*g -
 b*f + x*(b*g - 2*c*f))/(2*(-4*a*c + b**2)*(a + b*x + c*x**2)**2)

_______________________________________________________________________________________

Mathematica [A]  time = 0.263797, size = 128, normalized size = 0.98 \[ \frac{\frac{\left (b^2-4 a c\right ) (2 a g-b f+b g x-2 c f x)}{(a+x (b+c x))^2}-\frac{12 c (b g-2 c f) \tan ^{-1}\left (\frac{b+2 c x}{\sqrt{4 a c-b^2}}\right )}{\sqrt{4 a c-b^2}}+\frac{3 (b+2 c x) (2 c f-b g)}{a+x (b+c x)}}{2 \left (b^2-4 a c\right )^2} \]

Antiderivative was successfully verified.

[In]  Integrate[(f + g*x)/(a + b*x + c*x^2)^3,x]

[Out]

(((b^2 - 4*a*c)*(-(b*f) + 2*a*g - 2*c*f*x + b*g*x))/(a + x*(b + c*x))^2 + (3*(2*
c*f - b*g)*(b + 2*c*x))/(a + x*(b + c*x)) - (12*c*(-2*c*f + b*g)*ArcTan[(b + 2*c
*x)/Sqrt[-b^2 + 4*a*c]])/Sqrt[-b^2 + 4*a*c])/(2*(b^2 - 4*a*c)^2)

_______________________________________________________________________________________

Maple [A]  time = 0.007, size = 242, normalized size = 1.9 \[{\frac{bf-2\,ag+ \left ( -bg+2\,cf \right ) x}{ \left ( 8\,ac-2\,{b}^{2} \right ) \left ( c{x}^{2}+bx+a \right ) ^{2}}}-3\,{\frac{cxbg}{ \left ( 4\,ac-{b}^{2} \right ) ^{2} \left ( c{x}^{2}+bx+a \right ) }}+6\,{\frac{{c}^{2}xf}{ \left ( 4\,ac-{b}^{2} \right ) ^{2} \left ( c{x}^{2}+bx+a \right ) }}-{\frac{3\,{b}^{2}g}{2\, \left ( 4\,ac-{b}^{2} \right ) ^{2} \left ( c{x}^{2}+bx+a \right ) }}+3\,{\frac{bcf}{ \left ( 4\,ac-{b}^{2} \right ) ^{2} \left ( c{x}^{2}+bx+a \right ) }}-6\,{\frac{bcg}{ \left ( 4\,ac-{b}^{2} \right ) ^{5/2}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }+12\,{\frac{{c}^{2}f}{ \left ( 4\,ac-{b}^{2} \right ) ^{5/2}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) } \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((g*x+f)/(c*x^2+b*x+a)^3,x)

[Out]

1/2*(b*f-2*a*g+(-b*g+2*c*f)*x)/(4*a*c-b^2)/(c*x^2+b*x+a)^2-3/(4*a*c-b^2)^2/(c*x^
2+b*x+a)*c*x*b*g+6/(4*a*c-b^2)^2/(c*x^2+b*x+a)*c^2*x*f-3/2/(4*a*c-b^2)^2/(c*x^2+
b*x+a)*b^2*g+3/(4*a*c-b^2)^2/(c*x^2+b*x+a)*b*c*f-6/(4*a*c-b^2)^(5/2)*c*arctan((2
*c*x+b)/(4*a*c-b^2)^(1/2))*b*g+12/(4*a*c-b^2)^(5/2)*c^2*arctan((2*c*x+b)/(4*a*c-
b^2)^(1/2))*f

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((g*x + f)/(c*x^2 + b*x + a)^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.296498, size = 1, normalized size = 0.01 \[ \text{result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((g*x + f)/(c*x^2 + b*x + a)^3,x, algorithm="fricas")

[Out]

[-1/2*(6*(2*a^2*c^2*f - a^2*b*c*g + (2*c^4*f - b*c^3*g)*x^4 + 2*(2*b*c^3*f - b^2
*c^2*g)*x^3 + (2*(b^2*c^2 + 2*a*c^3)*f - (b^3*c + 2*a*b*c^2)*g)*x^2 + 2*(2*a*b*c
^2*f - a*b^2*c*g)*x)*log((b^3 - 4*a*b*c + 2*(b^2*c - 4*a*c^2)*x + (2*c^2*x^2 + 2
*b*c*x + b^2 - 2*a*c)*sqrt(b^2 - 4*a*c))/(c*x^2 + b*x + a)) - (6*(2*c^3*f - b*c^
2*g)*x^3 + 9*(2*b*c^2*f - b^2*c*g)*x^2 - (b^3 - 10*a*b*c)*f - (a*b^2 + 8*a^2*c)*
g + 2*(2*(b^2*c + 5*a*c^2)*f - (b^3 + 5*a*b*c)*g)*x)*sqrt(b^2 - 4*a*c))/((a^2*b^
4 - 8*a^3*b^2*c + 16*a^4*c^2 + (b^4*c^2 - 8*a*b^2*c^3 + 16*a^2*c^4)*x^4 + 2*(b^5
*c - 8*a*b^3*c^2 + 16*a^2*b*c^3)*x^3 + (b^6 - 6*a*b^4*c + 32*a^3*c^3)*x^2 + 2*(a
*b^5 - 8*a^2*b^3*c + 16*a^3*b*c^2)*x)*sqrt(b^2 - 4*a*c)), 1/2*(12*(2*a^2*c^2*f -
 a^2*b*c*g + (2*c^4*f - b*c^3*g)*x^4 + 2*(2*b*c^3*f - b^2*c^2*g)*x^3 + (2*(b^2*c
^2 + 2*a*c^3)*f - (b^3*c + 2*a*b*c^2)*g)*x^2 + 2*(2*a*b*c^2*f - a*b^2*c*g)*x)*ar
ctan(-sqrt(-b^2 + 4*a*c)*(2*c*x + b)/(b^2 - 4*a*c)) + (6*(2*c^3*f - b*c^2*g)*x^3
 + 9*(2*b*c^2*f - b^2*c*g)*x^2 - (b^3 - 10*a*b*c)*f - (a*b^2 + 8*a^2*c)*g + 2*(2
*(b^2*c + 5*a*c^2)*f - (b^3 + 5*a*b*c)*g)*x)*sqrt(-b^2 + 4*a*c))/((a^2*b^4 - 8*a
^3*b^2*c + 16*a^4*c^2 + (b^4*c^2 - 8*a*b^2*c^3 + 16*a^2*c^4)*x^4 + 2*(b^5*c - 8*
a*b^3*c^2 + 16*a^2*b*c^3)*x^3 + (b^6 - 6*a*b^4*c + 32*a^3*c^3)*x^2 + 2*(a*b^5 -
8*a^2*b^3*c + 16*a^3*b*c^2)*x)*sqrt(-b^2 + 4*a*c))]

_______________________________________________________________________________________

Sympy [A]  time = 7.7415, size = 651, normalized size = 4.97 \[ 3 c \sqrt{- \frac{1}{\left (4 a c - b^{2}\right )^{5}}} \left (b g - 2 c f\right ) \log{\left (x + \frac{- 192 a^{3} c^{4} \sqrt{- \frac{1}{\left (4 a c - b^{2}\right )^{5}}} \left (b g - 2 c f\right ) + 144 a^{2} b^{2} c^{3} \sqrt{- \frac{1}{\left (4 a c - b^{2}\right )^{5}}} \left (b g - 2 c f\right ) - 36 a b^{4} c^{2} \sqrt{- \frac{1}{\left (4 a c - b^{2}\right )^{5}}} \left (b g - 2 c f\right ) + 3 b^{6} c \sqrt{- \frac{1}{\left (4 a c - b^{2}\right )^{5}}} \left (b g - 2 c f\right ) + 3 b^{2} c g - 6 b c^{2} f}{6 b c^{2} g - 12 c^{3} f} \right )} - 3 c \sqrt{- \frac{1}{\left (4 a c - b^{2}\right )^{5}}} \left (b g - 2 c f\right ) \log{\left (x + \frac{192 a^{3} c^{4} \sqrt{- \frac{1}{\left (4 a c - b^{2}\right )^{5}}} \left (b g - 2 c f\right ) - 144 a^{2} b^{2} c^{3} \sqrt{- \frac{1}{\left (4 a c - b^{2}\right )^{5}}} \left (b g - 2 c f\right ) + 36 a b^{4} c^{2} \sqrt{- \frac{1}{\left (4 a c - b^{2}\right )^{5}}} \left (b g - 2 c f\right ) - 3 b^{6} c \sqrt{- \frac{1}{\left (4 a c - b^{2}\right )^{5}}} \left (b g - 2 c f\right ) + 3 b^{2} c g - 6 b c^{2} f}{6 b c^{2} g - 12 c^{3} f} \right )} - \frac{8 a^{2} c g + a b^{2} g - 10 a b c f + b^{3} f + x^{3} \left (6 b c^{2} g - 12 c^{3} f\right ) + x^{2} \left (9 b^{2} c g - 18 b c^{2} f\right ) + x \left (10 a b c g - 20 a c^{2} f + 2 b^{3} g - 4 b^{2} c f\right )}{32 a^{4} c^{2} - 16 a^{3} b^{2} c + 2 a^{2} b^{4} + x^{4} \left (32 a^{2} c^{4} - 16 a b^{2} c^{3} + 2 b^{4} c^{2}\right ) + x^{3} \left (64 a^{2} b c^{3} - 32 a b^{3} c^{2} + 4 b^{5} c\right ) + x^{2} \left (64 a^{3} c^{3} - 12 a b^{4} c + 2 b^{6}\right ) + x \left (64 a^{3} b c^{2} - 32 a^{2} b^{3} c + 4 a b^{5}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((g*x+f)/(c*x**2+b*x+a)**3,x)

[Out]

3*c*sqrt(-1/(4*a*c - b**2)**5)*(b*g - 2*c*f)*log(x + (-192*a**3*c**4*sqrt(-1/(4*
a*c - b**2)**5)*(b*g - 2*c*f) + 144*a**2*b**2*c**3*sqrt(-1/(4*a*c - b**2)**5)*(b
*g - 2*c*f) - 36*a*b**4*c**2*sqrt(-1/(4*a*c - b**2)**5)*(b*g - 2*c*f) + 3*b**6*c
*sqrt(-1/(4*a*c - b**2)**5)*(b*g - 2*c*f) + 3*b**2*c*g - 6*b*c**2*f)/(6*b*c**2*g
 - 12*c**3*f)) - 3*c*sqrt(-1/(4*a*c - b**2)**5)*(b*g - 2*c*f)*log(x + (192*a**3*
c**4*sqrt(-1/(4*a*c - b**2)**5)*(b*g - 2*c*f) - 144*a**2*b**2*c**3*sqrt(-1/(4*a*
c - b**2)**5)*(b*g - 2*c*f) + 36*a*b**4*c**2*sqrt(-1/(4*a*c - b**2)**5)*(b*g - 2
*c*f) - 3*b**6*c*sqrt(-1/(4*a*c - b**2)**5)*(b*g - 2*c*f) + 3*b**2*c*g - 6*b*c**
2*f)/(6*b*c**2*g - 12*c**3*f)) - (8*a**2*c*g + a*b**2*g - 10*a*b*c*f + b**3*f +
x**3*(6*b*c**2*g - 12*c**3*f) + x**2*(9*b**2*c*g - 18*b*c**2*f) + x*(10*a*b*c*g
- 20*a*c**2*f + 2*b**3*g - 4*b**2*c*f))/(32*a**4*c**2 - 16*a**3*b**2*c + 2*a**2*
b**4 + x**4*(32*a**2*c**4 - 16*a*b**2*c**3 + 2*b**4*c**2) + x**3*(64*a**2*b*c**3
 - 32*a*b**3*c**2 + 4*b**5*c) + x**2*(64*a**3*c**3 - 12*a*b**4*c + 2*b**6) + x*(
64*a**3*b*c**2 - 32*a**2*b**3*c + 4*a*b**5))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.412112, size = 269, normalized size = 2.05 \[ \frac{6 \,{\left (2 \, c^{2} f - b c g\right )} \arctan \left (\frac{2 \, c x + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{{\left (b^{4} - 8 \, a b^{2} c + 16 \, a^{2} c^{2}\right )} \sqrt{-b^{2} + 4 \, a c}} + \frac{12 \, c^{3} f x^{3} - 6 \, b c^{2} g x^{3} + 18 \, b c^{2} f x^{2} - 9 \, b^{2} c g x^{2} + 4 \, b^{2} c f x + 20 \, a c^{2} f x - 2 \, b^{3} g x - 10 \, a b c g x - b^{3} f + 10 \, a b c f - a b^{2} g - 8 \, a^{2} c g}{2 \,{\left (b^{4} - 8 \, a b^{2} c + 16 \, a^{2} c^{2}\right )}{\left (c x^{2} + b x + a\right )}^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((g*x + f)/(c*x^2 + b*x + a)^3,x, algorithm="giac")

[Out]

6*(2*c^2*f - b*c*g)*arctan((2*c*x + b)/sqrt(-b^2 + 4*a*c))/((b^4 - 8*a*b^2*c + 1
6*a^2*c^2)*sqrt(-b^2 + 4*a*c)) + 1/2*(12*c^3*f*x^3 - 6*b*c^2*g*x^3 + 18*b*c^2*f*
x^2 - 9*b^2*c*g*x^2 + 4*b^2*c*f*x + 20*a*c^2*f*x - 2*b^3*g*x - 10*a*b*c*g*x - b^
3*f + 10*a*b*c*f - a*b^2*g - 8*a^2*c*g)/((b^4 - 8*a*b^2*c + 16*a^2*c^2)*(c*x^2 +
 b*x + a)^2)